﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Entities
{
    public class Department : BaseEntity<int>
    {
        public Department()
        {
            StudyPlanItems = new List<StudyPlanItem>();
            Teachers = new List<Teacher>();
        }
        public virtual string DepartmentTitle { get; set; }
        public virtual IList<StudyPlanItem> StudyPlanItems { get; private set; }
        public virtual IList<Teacher> Teachers { get; private set; }

        public virtual void AddPlanItem(StudyPlanItem PlanItem)
        {
            PlanItem.Department = this;
            StudyPlanItems.Add(PlanItem);
        }

        public virtual void AddTeacher(Teacher teacher)
        {
            teacher.Department = this;
            Teachers.Add(teacher);
        }
    }
}